package cn.entity;

import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.Getter;
import lombok.Setter;

import javax.persistence.Entity;
import javax.persistence.ManyToMany;
import java.util.List;

/**
 * @author m on 2023/1/31
 * Description:
 */
@Entity
@Getter
@Setter
public class Tag extends BaseEntity{

    private String name;
    private boolean open;

    @ManyToMany(mappedBy = "tags")
    @JsonIgnore
    private List<Article> articles;

    public Tag(){
        open = false;
    }
}
